<template>
  <view>
    <text class="iconfont icon-duchaguanli cs"></text>
    <text class="iconfont icon-done cs"></text>

    <uni-icons color="pink" customPrefix="iconfont" type="icon-done" size="100" />

    <text class="uniui-icon uniui-icon-symbol-tool-03 yy"></text>

    <button class="uni-button" @click="login">按钮一号</button>

    <text>{{ store.count }}</text>
    <button @click="store.add">+1</button>
  </view>
</template>

<script setup lang="ts">
import { request } from "@/utils/http"
import { useCountStore } from "@/stores/count"


const store = useCountStore()

// 登录请求 按钮触发
const login = async () => {
  // const res = await request
  //   .post("/login/password", {
  //     mobile: "13211112222",
  //     // 密码 abc123456 测试：出现非10000的情况
  //     password: "abc12345",
  //   })
  //   .then((res) => {
  //     // 成功打印
  //     console.log(res)
  //   })
  //   .catch((err) => {
  //     // 失败打印
  //     console.log(err)
  //   })
  // console.log(res)
  const res = await request.get('/patient/myUser')
    console.log(res)
}
</script>

<style lang="scss" scoped>
.cs {
  font-size: 300rpx;
  color: rgb(111, 73, 235);
}
.yy {
  width: 130rpx;
  height: 120rpx;
}
</style>
